import Home from '../components/Home.vue'
import AddAdvice from '../components/AddAdvice.vue'
import FeedBack from '../components/FeedBack.vue'
import UserLogin from '../components/UserLogin.vue'
import UserRegister from '../components/UserRegister.vue'
import ChartComp from '../components/ChartComp.vue'
import OhlcChart from '../components/OhlcChart.vue'

import { createRouter, createWebHashHistory } from 'vue-router'

// 2. 定义一些路由
// 每个路由都需要映射到一个组件。
// 我们后面再讨论嵌套路由。

// 再Vue 页面中
const routes = [
    { path: '/', component: Home },
    { path: '/addadvice', component: AddAdvice },
    { path: '/feedback', component: FeedBack },
    { path: '/userLogin',component:UserLogin},
    { path: '/register',component:UserRegister},
    { path: '/chart',component:ChartComp},
    { path: '/OhlcChart',component:OhlcChart}


]

const router = createRouter({
    routes,
    history: createWebHashHistory()
})


export default router